package thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class demo7 {
    public static void main(String[] args) throws InterruptedException {
        //创建线程池
        //1. 利用Executors这样的工厂类来创建线程
        //可以扩容的线程池
        ExecutorService executorService1 = Executors.newCachedThreadPool();
        //线程数固定的线程池
        ExecutorService executorService2 = Executors.newFixedThreadPool(5);
        //只有一个线程的线程池
        ExecutorService executorService3 = Executors.newSingleThreadExecutor();
        //
        new ExecutorService
    }


}
